<!DOCTYPE html>
<html>
<head>
    

    

    
<!-- Baidu Tongji -->
<script>var _hmt = _hmt || []</script>
<script async src="//hm.baidu.com/hm.js?48711b05b1c1178a5b74ec9dcd75c600"></script>
<!-- End Baidu Tongji -->




    <meta charset="utf-8">
    <meta name="baidu-site-verification" content="d0GGaTdNRH" />
    
    
    
    
    <title>electron打包应用在win7无法启动解决方案 | jscheng</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    
    <meta name="theme-color" content="#3F51B5">
    
    
    <!--<meta name="keywords" content="electron">-->
    <meta name="keywords" content="electron打包应用在win7无法启动解决方案 | jscheng">

    <meta name="description" content="web前端,jscheng,blog,jscheng的博客，JSCheng">
<meta property="og:type" content="blog">
<meta property="og:title" content="electron打包应用在win7无法启动解决方案">
<meta property="og:url" content="https://www.jscheng.top/2020/05/09/electron-win7-error/index.html">
<meta property="og:site_name" content="jscheng">
<meta property="og:description" content="web前端,jscheng,blog,jscheng的博客，JSCheng">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2020-05-09T02:39:24.000Z">
<meta property="article:modified_time" content="2021-07-09T05:22:26.094Z">
<meta property="article:author" content="jscheng">
<meta property="article:tag" content="electron">
<meta name="twitter:card" content="summary">

    
    <link rel="shortcut icon" href="/blog/favicon.ico">
    <link rel="stylesheet" href="//unpkg.com/hexo-theme-material-indigo@latest/css/style.css">
    <script>window.lazyScripts=[]</script>

    <!-- custom head -->
    

<meta name="generator" content="Hexo 4.2.1"></head>

<body>
    <style>
        .container{
            /* width: 1200px; */
        }
        *{
            box-sizing: border-box;
        }
    </style>
    <img src="https://jscheng-img.oss-cn-shanghai.aliyuncs.com/logo.png" alt="logo" hidden>
    <div id="loading" class="active"></div>

    <aside id="menu" class="hide" >
  <div class="inner flex-row-vertical">
    <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menu-off">
        <i class="icon icon-lg icon-close"></i>
    </a>
    <div class="brand-wrap" style="background-image:url(/blog/img/brand.jpg)">
      <div class="brand">
        <a href="/blog/" class="avatar waves-effect waves-circle waves-light">
          <img src="/blog/img/avatar.png">
        </a>
        <hgroup class="introduce">
          <h5 class="nickname">jscheng</h5>
          <a href="mailto:wangcheng55555@163.com" title="wangcheng55555@163.com" class="mail">wangcheng55555@163.com</a>
        </hgroup>
      </div>
    </div>
    <div class="scroll-wrap flex-col">
      <ul class="nav">
        
            <li class="waves-block waves-effect">
              <a href="/blog/"  >
                <i class="icon icon-lg icon-home"></i>
                主页
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/blog/archives"  >
                <i class="icon icon-lg icon-archives"></i>
                目录
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/blog/tags"  >
                <i class="icon icon-lg icon-tags"></i>
                标签
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/blog/categories"  >
                <i class="icon icon-lg icon-th-list"></i>
                类别
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/blog/about"  >
                <i class="icon icon-lg icon-link"></i>
                about
              </a>
            </li>
        
      </ul>
    </div>
  </div>
</aside>

    <main id="main">
        <header class="top-header" id="header">
    <div class="flex-row">
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light on" id="menu-toggle">
          <i class="icon icon-lg icon-navicon"></i>
        </a>
        <div class="flex-col header-title ellipsis">electron打包应用在win7无法启动解决方案</div>
        
        
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menuShare">
            <i class="icon icon-lg icon-share-alt"></i>
        </a>
        
    </div>
</header>
<header class="content-header post-header">

    <div class="container fade-scale">
        <h1 class="title">electron打包应用在win7无法启动解决方案</h1>
        <h5 class="subtitle">
            
                <time datetime="2020-05-09T02:39:24.000Z" itemprop="datePublished" class="page-time">
  2020-05-09
</time>


	<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/blog/categories/%E9%97%AE%E7%AD%94/">问答</a></li></ul>

            
        </h5>
    </div>

    


</header>


<div class="container body-wrap">
    
    <aside class="post-widget">
        <nav class="post-toc-wrap post-toc-shrink" id="post-toc">
            <h4>TOC</h4>
            <ol class="post-toc"><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#问题-1：win7兼容"><span class="post-toc-number">1.</span> <span class="post-toc-text">问题 1：win7兼容</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-5"><a class="post-toc-link" href="#1-方法一："><span class="post-toc-number">1.0.0.1.</span> <span class="post-toc-text">1. 方法一：</span></a></li><li class="post-toc-item post-toc-level-5"><a class="post-toc-link" href="#2-方法二："><span class="post-toc-number">1.0.0.2.</span> <span class="post-toc-text">2. 方法二：</span></a></li></ol></li></ol></li></ol></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#问题2：win7上打不开，后台进程中有"><span class="post-toc-number">2.</span> <span class="post-toc-text">问题2：win7上打不开，后台进程中有</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#问题3：在win7下白屏"><span class="post-toc-number">3.</span> <span class="post-toc-text">问题3：在win7下白屏</span></a></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#问题4：在win7点击electron缺少-dll-文件"><span class="post-toc-number">4.</span> <span class="post-toc-text">问题4：在win7点击electron缺少 *.dll 文件</span></a></li></ol>
        </nav>
    </aside>


<article id="post-electron-win7-error"
  class="post-article article-type-post fade" itemprop="blogPost">

    <div class="post-card">
        <h1 class="post-card-title">electron打包应用在win7无法启动解决方案</h1>
        <div class="post-meta">
            <time class="post-time" title="2020-05-09 10:39:24" datetime="2020-05-09T02:39:24.000Z"  itemprop="datePublished">2020-05-09</time>

            
	<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/blog/categories/%E9%97%AE%E7%AD%94/">问答</a></li></ul>



            
<span id="busuanzi_container_page_pv" title="文章总阅读量" style='display:none'>
    <i class="icon icon-eye icon-pr"></i><span id="busuanzi_value_page_pv"></span>
</span>


        </div>
        <div class="post-content" id="post-content" itemprop="postContent">
            <h2 id="问题-1：win7兼容"><a href="#问题-1：win7兼容" class="headerlink" title="问题 1：win7兼容"></a>问题 1：win7兼容</h2><p>electron打包后的app，在win7的某些电脑（非管理员的情况下有一定概率出现）双击软件安装后生成的快捷方式，然后啥事情也没有发生，但是打开控制台可以看到应用的进程启动一下然后快速被关掉。<br> 解决方法：</p>
<h5 id="1-方法一："><a href="#1-方法一：" class="headerlink" title="1. 方法一："></a>1. 方法一：</h5><pre><code>软件的兼容性问题，可能是有些电脑的系统比较古老，
和electron有兼容性问题，更新electron版本比较容易有其他问题，
解决方法是以兼容模式启动运行软件。步骤如下：
第一步，把鼠标放在快捷方式的图标上，右击选择--属性--选项
第二步， 点击兼容性，把-- 以兼容模式运行这个程序--打勾，
然后下面下拉选择你当前系统的类型。然后点击确定，最后重开软件。</code></pre><h5 id="2-方法二："><a href="#2-方法二：" class="headerlink" title="2. 方法二："></a>2. 方法二：</h5><pre><code>卸载重新安装，注意用管理员模式安装，同时关闭杀毒软件。
有些情况下因为杀毒软件的原因把软件的某些文件删掉造成无法启动，
用管理员模式启动软件；</code></pre><br/>
<br/>

<hr>
<br/>
<br/>

<h2 id="问题2：win7上打不开，后台进程中有"><a href="#问题2：win7上打不开，后台进程中有" class="headerlink" title="问题2：win7上打不开，后台进程中有"></a>问题2：win7上打不开，后台进程中有</h2><p>electron打包文件，在某些windows7上打不开，后台进程中有，只是页面不显示<br>研究发现，页面打不开，进程中有，是因为这个程序的优先级的问题，如果把程序的优先级调高，那就可以打开。<br>所以想到了用bat脚本来启动程序，这样就可以用高优先级运行程序。其实我一直想找一种办法就是在代码里控制windows的注册表，<br>从注册表中来调高程序的优先级。</p>
<p>下面是bat文件的代码</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">start &#x2F;HIGH &quot;.\阳光语文 x.x.x.exe&quot;</span><br></pre></td></tr></table></figure>

<pre><code>解释：
start       // 开启
/HIGH       //高优先级，这是windows上的，还有其他的级别，可以百度哈
“.”         // 相对路径，用来找到你想启动的程序
****.exe    // 这是你要启动的程序的exe文件
写完后，把文件的后缀改为.bat，这样双击就能运行了</code></pre><br/>
<br/>

<h2 id="问题3：在win7下白屏"><a href="#问题3：在win7下白屏" class="headerlink" title="问题3：在win7下白屏"></a>问题3：在win7下白屏</h2><p>electron桌面客户端软件，部分用户安装以后会出现白屏问题，经过测试发现，<br>其实软件根本没有完全启动，但是打印log却又完整的执行了页面的渲染，但是软件完全白屏。</p>
<p>查看是win7极限精简版。</p>
<p>解决：</p>
<pre><code>发现 win7系统的 .NET Framework 可能版本超级过低
然后安装了最新版的.NET Framework（用于Windows的新托管代码编程模型）。</code></pre><p><a href="https://dotnet.microsoft.com/download/dotnet-framework" target="_blank" rel="noopener">.NET Framework 微软官方下载链接</a></p>
<br/>
<br/>

<h2 id="问题4：在win7点击electron缺少-dll-文件"><a href="#问题4：在win7点击electron缺少-dll-文件" class="headerlink" title="问题4：在win7点击electron缺少 *.dll 文件"></a>问题4：在win7点击electron缺少 *.dll 文件</h2><p>1.下载DirectX修复工具并解压。<br>2.根据自己的系统，点击“DirectX Repair”文件，或者点击“DirectX_Repair_win8”，点击“检测并修复”选项。<br>3.等待修复完成，然后点击“确定”和“退出”，再重启电脑即可。</p>
<p><a href="http://forspeed.onlinedown.net/down/120082DirectX_Repair-V3_9.7z" target="_blank" rel="noopener">DirectX</a><br>失效时点击下边下载<br><a href="https://www.onlinedown.net/soft/120082.htm" target="_blank" rel="noopener">DirectX下载链接</a><br>请选择本地下载 ===&gt;普通下载地址</p>

        </div>

        <blockquote class="post-copyright">
    
    <div class="content">
        
<span class="post-time">
    最后更新时间：<time datetime="2021-07-09T05:22:26.094Z" itemprop="dateUpdated">2021-07-09 13:22:26</time>
</span><br>


        
    </div>
    
    <footer>
        <a href="https://www.jscheng.top">
            <img src="/blog/img/avatar.png" alt="jscheng">
            jscheng
        </a>
    </footer>
</blockquote>

        
<div class="page-reward">
    <a id="rewardBtn" href="javascript:;" class="page-reward-btn waves-effect waves-circle waves-light">赏</a>
</div>



        <div class="post-footer">
            
	<ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/blog/tags/electron/" rel="tag">electron</a></li></ul>


            
<div class="page-share-wrap">
    

<div class="page-share" id="pageShare">
    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=https://www.jscheng.top/2020/05/09/electron-win7-error/&title=《electron打包应用在win7无法启动解决方案》 — jscheng&pic=https://www.jscheng.top/img/avatar.png" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=https://www.jscheng.top/2020/05/09/electron-win7-error/&title=《electron打包应用在win7无法启动解决方案》 — jscheng&source=jscheng 的博客" data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <!--<li>-->
        <!--<a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=https://www.jscheng.top/2020/05/09/electron-win7-error/" data-title=" Facebook">-->
          <!--<i class="icon icon-facebook"></i>-->
        <!--</a>-->
      <!--</li>-->
      <!--<li>-->
        <!--<a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《electron打包应用在win7无法启动解决方案》 — jscheng&url=https://www.jscheng.top/2020/05/09/electron-win7-error/&via=https://www.jscheng.top" data-title=" Twitter">-->
          <!--<i class="icon icon-twitter"></i>-->
        <!--</a>-->
      <!--</li>-->
      <!--<li>-->
        <!--<a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=https://www.jscheng.top/2020/05/09/electron-win7-error/" data-title=" Google+">-->
          <!--<i class="icon icon-google-plus"></i>-->
        <!--</a>-->
      <!--</li>-->
    </ul>
 </div>



    <a href="javascript:;" id="shareFab" class="page-share-fab waves-effect waves-circle">
        <i class="icon icon-share-alt icon-lg"></i>
    </a>
</div>



        </div>
    </div>

    
<nav class="post-nav flex-row flex-justify-between">
  
    <div class="waves-block waves-effect prev">
      <a href="/blog/2020/05/09/git/" id="post-prev" class="post-nav-link">
        <div class="tips"><i class="icon icon-angle-left icon-lg icon-pr"></i> Prev</div>
        <h4 class="title">git基本使用</h4>
      </a>
    </div>
  

  
    <div class="waves-block waves-effect next">
      <a href="/blog/2020/05/07/vue-router/" id="post-next" class="post-nav-link">
        <div class="tips">Next <i class="icon icon-angle-right icon-lg icon-pl"></i></div>
        <h4 class="title">vueRouter 设置</h4>
      </a>
    </div>
  
</nav>



    











    <!-- Valine Comments -->
    <div class="comments vcomment" id="comments"></div>
    <script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
    <script src="//unpkg.com/valine@latest/dist/Valine.min.js"></script>
    <!-- Valine Comments script -->
    <script>
        var GUEST_INFO = ['nick','mail','link'];
        var guest_info = 'nick,mail'.split(',').filter(function(item){
          return GUEST_INFO.indexOf(item) > -1
        });
        new Valine({
            el: '#comments',
            notify: 'false' == 'true',
            verify: 'false' == 'true',
            appId: "hgOSdOMMl0QDNQ9A5Dd0BV74-gzGzoHsz",
            appKey: "6gJhVhXHxUAUmo2qsoqpUFpi",
            avatar: "mm",
            placeholder: "请输入",
            guest_info: guest_info.length == 0 ? GUEST_INFO : guest_info,
            pageSize: "10"
        })
    </script>
    <!-- Valine Comments end -->










</article>

<div id="reward" class="page-modal reward-lay">
    <a class="close" href="javascript:;"><i class="icon icon-close"></i></a>
    <h3 class="reward-title">
        <i class="icon icon-quote-left"></i>
        谢谢大爷~
        <i class="icon icon-quote-right"></i>
    </h3>
    <div class="reward-content">
        
        <div class="reward-code">
            <img id="rewardCode" src="/blog/img/wechat.jpg" alt="打赏二维码">
        </div>
        
    </div>
</div>



</div>

        <footer class="footer">
    <div class="top">
        
<p>
    <span id="busuanzi_container_site_uv" style='display:none'>
        站点总访客数：<span id="busuanzi_value_site_uv"></span>
    </span>
    <span id="busuanzi_container_site_pv" style='display:none'>
        站点总访问量：<span id="busuanzi_value_site_pv"></span>
    </span>
</p>


       <!-- <p>
            
            <span>博客内容遵循</span>
        </p>-->
    </div>
    <div class="bottom">
        <p><span>jscheng &copy; 2020 - 2021</span>
            <span>
                
                <a href="http://www.miitbeian.gov.cn/" target="_blank">鲁ICP备18022674号-1</a><br>
                
                Power by <a href="http://hexo.io/" target="_blank">Hexo</a> Theme <a href="https://github.com/yscoder/hexo-theme-indigo" target="_blank">indigo</a>
            </span>
        </p>
    </div>
</footer>

    </main>
    <div class="mask" id="mask"></div>
<a href="javascript:;" id="gotop" class="waves-effect waves-circle waves-light"><span class="icon icon-lg icon-chevron-up"></span></a>



<div class="global-share" id="globalShare">
    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=https://www.jscheng.top/2020/05/09/electron-win7-error/&title=《electron打包应用在win7无法启动解决方案》 — jscheng&pic=https://www.jscheng.top/img/avatar.png" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=https://www.jscheng.top/2020/05/09/electron-win7-error/&title=《electron打包应用在win7无法启动解决方案》 — jscheng&source=jscheng 的博客" data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <!--<li>-->
        <!--<a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=https://www.jscheng.top/2020/05/09/electron-win7-error/" data-title=" Facebook">-->
          <!--<i class="icon icon-facebook"></i>-->
        <!--</a>-->
      <!--</li>-->
      <!--<li>-->
        <!--<a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《electron打包应用在win7无法启动解决方案》 — jscheng&url=https://www.jscheng.top/2020/05/09/electron-win7-error/&via=https://www.jscheng.top" data-title=" Twitter">-->
          <!--<i class="icon icon-twitter"></i>-->
        <!--</a>-->
      <!--</li>-->
      <!--<li>-->
        <!--<a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=https://www.jscheng.top/2020/05/09/electron-win7-error/" data-title=" Google+">-->
          <!--<i class="icon icon-google-plus"></i>-->
        <!--</a>-->
      <!--</li>-->
    </ul>
 </div>


<div class="page-modal wx-share" id="wxShare">
    <a class="close" href="javascript:;"><i class="icon icon-close"></i></a>
    <p>扫一扫，分享到微信</p>
    <img src="//api.qrserver.com/v1/create-qr-code/?data=https://www.jscheng.top/2020/05/09/electron-win7-error/" alt="微信分享二维码">
</div>




    <script src="//cdn.bootcss.com/node-waves/0.7.4/waves.min.js"></script>
<script>
var BLOG = { ROOT: '/blog/', SHARE: true, REWARD: true };


</script>

<script src="//unpkg.com/hexo-theme-material-indigo@latest/js/main.min.js"></script>






<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>



<script>
(function() {
    var OriginTitile = document.title, titleTime;
    document.addEventListener('visibilitychange', function() {
        if (document.hidden) {
            document.title = '哪去了！';
            clearTimeout(titleTime);
        } else {
            document.title = 'jscheng';
            titleTime = setTimeout(function() {
                document.title = OriginTitile;
            },2000);
        }
    });
})();
</script>



</body>
</html>
